# Attention: This can only run under WINDOWS
import zmail
import pymsgbox
user='531786847@qq.com'
code='fxqvalyklodxcagb'
server=zmail.server(user,code)
mail=server.get_latest()
msg=str(mail['id'])+str(mail['subject'])+str(mail['date'])
f=open('.last_mail','r')
msg_last=f.read()
f.close()
if msg != msg_last:
    pymsgbox.alert('New message received.')
    f=open('.last_mail','w')
    f.write(msg)
    f.close()
